package org.example;

import org.example.condition.LinuxConditional;
import org.example.condition.WindowsConditional;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

@Configuration
public class AppConfig {
    @Conditional(WindowsConditional.class)
    @Bean
    public ListService windowsListService(){
        return new WindowsListService();
    }

    @Conditional(LinuxConditional.class)
    @Bean
    public ListService linuxListService(){
        return new LinuxListService();
    }
}
